package com.alibaba.yinan.domain.task.service.validator;

import com.alibaba.cola.exception.BizException;
import com.alibaba.yinan.domain.task.Task;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @ClassName DeviceTypeValidator
 * @Author mengke
 * @create 2025/8/3 22:01
 * @Description
 */
@Slf4j
@Component
public class DeviceTypeValidator implements DispatchValidator {
    @Override
    public void validate(Task task) {
        log.info("开始校验设备类型，任务ID：{}", task.getId());
        if (task.getTargetDeviceType() == null) {
            throw new BizException("目标设备类型不能为空");
        }
    }
}

